<div class="welcome">
    <div>
        <h1 class="page-title">源码搜索</h1>
    </div>
    <div class="layui-tab-item layui-show">
        <div>
            <form class="layui-form layui-form-pane"> <!-- 提示：如果你不想用form，你可以换成div等任何一个普通元素 -->
                实际匹配的搜索时间：<span data-bind="text: currentAction().lastestRunTime"></span>
                <div class="layui-inline">
                    <label class="layui-form-label label-long">精确关键词（匹配所有）</label>
                    <div class="layui-input-block input-long">
                        <input type="text" name="name" data-bind="value: param.termKeyword" placeholder="请输入" autocomplete="off" class="layui-input" />
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label label-long">精确关键词（匹配任意一个）</label>
                    <div class="layui-input-block input-long">
                        <input type="text" name="name" data-bind="value: param.termKeywordOr" placeholder="请输入" autocomplete="off" class="layui-input" />
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">模糊关键词</label>
                    <div class="layui-input-block">
                        <input type="text" name="name" data-bind="value: param.wildcardKeyword" placeholder="请输入" autocomplete="off" class="layui-input" />
                    </div>
                </div>
                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="search-submit">查询</button>
                <button class="layui-btn layui-btn-normal" id="share-url">分享</button>
            </form>
        </div>
        <div id="list-table" lay-filter="list-table">
        </div>
        <div style="width: 800px; margin: 0 auto; padding-top: 30px;">
            <div data-bind="visible: (param.termKeyword() || param.wildcardKeyword() || param.termKeywordOr())">
                    <div data-bind="visible: pageList().length > 0">
                        <div style="width: 600px; margin: 0 auto;">
                            <div data-bind="foreach: { data: pageList, as: 'eachPage' }">
                                <div data-bind="html: eachPage.highlight"></div>
                                <div style="color: #66ccff; padding: 5px;">链接：<span data-bind="html: eachPage.commonBody.url"></span></div>
                                <a class="layui-btn layui-btn-normal" data-bind="attr: { href: eachPage.commonBody.url }" target="_blank">前往该页</a>
                                <a class="layui-btn layui-btn-normal" data-bind="attr: { href: '/back/review/' + encodeURIComponent(eachPage._id) }" target="_blank">预览</a>
                                <hr />
                            </div>
                        </div>
                        <div id="keyword-page"></div>
                    </div>
                    <div style="width: 600px; margin: 0 auto;" data-bind="visible: pageList().length === 0">
                        没有结果
                    </div>
                </div>
            </div>
            <div style="width: 600px; margin: 0 auto;" data-bind="visible: ! (param.termKeyword() || param.wildcardKeyword() || param.termKeywordOr())">
                请输入搜索关键词
            </div>
        </div>
    </div>
</div>